#include "stdafx.h"
#include "Languages.h"
#include "resource.h"
#include "Util.h"

CString myA2W(const char*p)
{
    CString str(p);
    return str;
}

CLanguages::CLanguages(void)
{

    std::vector<CWorld> VV;
#define ADD_IDD( id ) m_Datas[id] = VV; m_IDD2str[id] = #id;
        ADD_IDD(IDD_DIALOG_MainFram)
        ADD_IDD(IDD_DIALOG_Login)
        ADD_IDD(IDD_DIALOG_Skin)
        ADD_IDD(IDD_DIALOG_Path)
        ADD_IDD(IDD_DIALOG_DataSet)
        ADD_IDD(STRINGTABLE)
		ADD_IDD(IDD_DIALOG_SET)
#undef ADD_IDD

#define ADD_IDC( id ) m_str2IDC[myA2W(#id)] = id;
        ADD_IDC(IDI_ICON_Accept)
        ADD_IDC(IDI_ICON_Delete)
        ADD_IDC(IDI_ICON_Set)
        ADD_IDC(IDI_ICON_Attach)

        //<IDD_DIALOG_MainFram>
        ADD_IDC(IDC_TREE_Set)
        ADD_IDC(IDC_COMBO_Config)
        ADD_IDC(IDC_STATIC_Info)
        ADD_IDC(IDC_Combo_Seting)
        ADD_IDC(IDC_BtnStart)
        ADD_IDC(IDC_BtnSave)
        ADD_IDC(IDC_BtnBack)
        ADD_IDC(IDC_BtnGetName)
        ADD_IDC(IDC_Edit_WndName)

        //<IDD_DIALOG_Login>
        ADD_IDC(IDC_Btn_Attach)
        ADD_IDC(IDC_Combo_User)
        ADD_IDC(IDC_Btn_Login)
        ADD_IDC(IDC_BtnReg)
		ADD_IDC(IDC_Btn_Load)
		ADD_IDC(IDC_Btn_Attach)

        //<IDD_DIALOG_Skin>
        ADD_IDC(IDC_TAB_Skin)
        ADD_IDC(IDC_BMP_BAR)
        ADD_IDC(IDC_STATIC_URL)

        //<IDD_DIALOG_Path>
        ADD_IDC(IDC_COMBO_PathName)
        ADD_IDC(IDC_COMBO_PathType)
        ADD_IDC(IDC_LIST_Points)
        ADD_IDC(IDC_Btn_Record)
        ADD_IDC(IDC_Btn_Stop)
        ADD_IDC(IDC_Btn_DelSel)
        ADD_IDC(IDC_Btn_DelAll)

        //<IDD_DIALOG_DataSet>
        ADD_IDC(IDC_COMBO_Select)
        ADD_IDC(IDC_LIST_Check)
        ADD_IDC(IDC_STATIC_Info)
        
        //<STRINGTABLE>
        ADD_IDC(IDS_STRING_SelPathName)
        ADD_IDC(IDS_STRING_SelPathType)
        ADD_IDC(IDS_STRING_ConfigName)

		//IDD_DIALOG_SET
		ADD_IDC(IDC_BtnStart)
		ADD_IDC(IDC_BtnStopWarn)
		ADD_IDC(IDC_BtnGoBack)
#undef ADD_IDC

        Init(CUtil::GetModuleDirectory()+c_Lan);

}